11.3 查询用户目录详情
Path: /api/v1/userDirectory/query
Method: GET
接口描述:
请求参数
Query
根据id查询
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
id | 必须 | 用户目录id |
根据name查询
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
name | 必须 | 用户目录name |
返回数据
名称 | 类型 | 是否必须 | 默认值 | 备注 | 其他信息 |
---|---|---|---|---|---|
code | number | 必须 | 错误码,非0标识失败 | ||
data | object | 必须 | 返回数据主体 | ||
├─ data | object | 必须 | 数据 | ||
├─├─ id | string | 必须 | 用户目录ID | ||
├─├─ name | string | 必须 | 用户目录名称 | ||
├─├─ type | string | 必须 | 用户目录类型,'ldap', 'local', 'wechat', 'custom' | ||
├─├─ authComposeId | string | 必须 | 用户目录默认的认证策略ID | ||
├─├─ authComposeName | string | 必须 | 用户目录默认的认证策略名 | ||
├─├─ domain | string | 必须 | 用户目录的域 | ||
├─├─ mappingOptions | object | 必须 | 用户灵活字段映射配置 | ||
├─├─ config | object | 必须 | 用户目录配置 | ||
├─├─ description | string | 非必须 | 描述 | ||
msg | string | 非必须 | code对应的提示信息 |
返回示例
{
"code": 0,
"data": {
"data": {
"id": "c1085980-a3da-11eb-ab69-8353f1c26be3",
"name": "idldap-test",
"description": "",
"domain": "idldap-test.com",
"authComposeId": "c109e020-a3da-11eb-ab69-8353f1c26be3",
"authComposeName": "默认策略",
"type": "ldap",
"config": {
"type": "ldap",
"ignoreCase": 0,
"syncConfig": {
"hadSync": true,
"pageSize": 200,
"syncTime": {
"period": 86400000
},
"cleanDeleted": {
"enable": 1,
"interval": 168
}
},
"templateId": "14c280a1-5eac-46e6-8e82-f0fed48f0583",
"interfaceStatus": 1,
"externalUserServerConfig": {
"type": "ad",
"serverIp": "1.1.1.1",
"directory": {
"type": "ldap",
"subtype": "default"
},
"bandFilter": "(|(objectclass=groupOfUniqueNames)|(objectclass=groupOfNames)|(objectclass=posixGroup))",
"reqTimeout": "15",
"userFilter": "(objectclass=person)",
"groupFilter": "(ou=*)",
"adminAccount": "cn=Manager,dc=mloupen,dc=com",
"adminPassword": "♂♀☺♪♫◙♂1",
"serverAddress": "ldaps://1.1.1.1",
"searchEntrance": "ou=openldapgroupA,dc=mloupen,dc=com",
"serverProtocol": "ldaps://",
"bandAttrMapping": {
"name": "cn",
"externalId": "entryUUID",
"description": "description"
},
"interfaceStatus": 1,
"userAttrMapping": {
"band": "memberOf",
"name": "uid",
"path": "ou",
"email": "mail",
"phone": "telephoneNumber",
"status": "",
"externalId": "entryUUID",
"description": "description",
"displayName": "displayName",
"expiredTime": ""
},
"groupAttrMapping": {
"name": "ou",
"externalId": "entryUUID",
"description": "description"
}
},
"unImportedUserAuthOption": {
"behavior": "default"
},
"forbidUnimportedUserLogin": 1
},
"mappingOptions": [{
"label": "用户名(default)",
"value": "name"
}, {
"label": "显示名(default)",
"value": "displayName"
}, {
"label": "描述(default)",
"value": "description"
}, {
"label": "手机号码(default)",
"value": "phone"
}, {
"label": "电子邮箱(default)",
"value": "email"
}, {
"label": "外部ID(default)",
"value": "externalId"
}]
}
},
"msg": "请求成功"
}
错误信息
错误提示 | 错误码 |
---|---|
参数检查出错 | 10000001 |
用户目录不存在 | 77200001 |